home *** CD-ROM | disk | FTP | other *** search
/ OpenGL Superbible (2nd Edition) / OpenGL SuperBible e2.iso / tools / FLTK-1.0.6 / test / tile.cxx < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-07  |  2.4 KB  |  91 lines

  1. //
  2. // "$Id: tile.cxx,v 1.4 1999/01/07 19:18:01 mike Exp $"
  3. //
  4. // Tile test program for the Fast Light Tool Kit (FLTK).
  5. //
  6. // Copyright 1998-1999 by Bill Spitzak and others.
  7. //
  8. // This library is free software; you can redistribute it and/or
  9. // modify it under the terms of the GNU Library General Public
  10. // License as published by the Free Software Foundation; either
  11. // version 2 of the License, or (at your option) any later version.
  12. //
  13. // This library is distributed in the hope that it will be useful,
  14. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16. // Library General Public License for more details.
  17. //
  18. // You should have received a copy of the GNU Library General Public
  19. // License along with this library; if not, write to the Free Software
  20. // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
  21. // USA.
  22. //
  23. // Please report all bugs and problems to "fltk-bugs@easysw.com".
  24. //
  25.  
  26. #include <FL/Fl.H>
  27. #include <FL/Fl_Double_Window.H>
  28. #include <FL/Fl_Tile.H>
  29. #include <FL/Fl_Box.H>
  30.  
  31. int main(int argc, char** argv) {
  32.   Fl_Window window(300,300);
  33.   window.box(FL_NO_BOX);
  34.   window.resizable(window);
  35.   Fl_Tile tile(0,0,300,300);
  36.   Fl_Box box0(0,0,150,150,"0");
  37.   box0.box(FL_DOWN_BOX);
  38.   box0.color(9);
  39.   box0.labelsize(36);
  40.   box0.align(FL_ALIGN_CLIP);
  41.   Fl_Window w1(150,0,150,150,"1");
  42.   w1.box(FL_NO_BOX);
  43.   Fl_Box box1(0,0,150,150,"1\nThis is a\nchild\nX window");
  44.   box1.box(FL_DOWN_BOX);
  45.   box1.color(19);
  46.   box1.labelsize(18);
  47.   box1.align(FL_ALIGN_CLIP);
  48.   w1.resizable(box1);
  49.   w1.end();
  50.  
  51.   //  Fl_Tile tile2(0,150,150,150);
  52.   Fl_Box box2a(0,150,70,150,"2a");
  53.   box2a.box(FL_DOWN_BOX);
  54.   box2a.color(12);
  55.   box2a.labelsize(36);
  56.   box2a.align(FL_ALIGN_CLIP);
  57.   Fl_Box box2b(70,150,80,150,"2b");
  58.   box2b.box(FL_DOWN_BOX);
  59.   box2b.color(13);
  60.   box2b.labelsize(36);
  61.   box2b.align(FL_ALIGN_CLIP);
  62.   //tile2.end();
  63.  
  64.   //Fl_Tile tile3(150,150,150,150);
  65.   Fl_Box box3a(150,150,150,70,"3a");
  66.   box3a.box(FL_DOWN_BOX);
  67.   box3a.color(12);
  68.   box3a.labelsize(36);
  69.   box3a.align(FL_ALIGN_CLIP);
  70.   Fl_Box box3b(150,150+70,150,80,"3b");
  71.   box3b.box(FL_DOWN_BOX);
  72.   box3b.color(13);
  73.   box3b.labelsize(36);
  74.   box3b.align(FL_ALIGN_CLIP);
  75.   //tile3.end();
  76.   
  77.   Fl_Box r(10,0,300-10,300-10);
  78.   tile.resizable(r);
  79.   // r.box(FL_BORDER_FRAME);
  80.  
  81.   tile.end();
  82.   window.end();
  83.   window.show(argc,argv);
  84.   w1.show();
  85.   return Fl::run();
  86. }
  87.  
  88. //
  89. // End of "$Id: tile.cxx,v 1.4 1999/01/07 19:18:01 mike Exp $".
  90. //
  91.